<extend name="Public:base" />
<block name="content">
    <style type="text/css">
        div,ul,li{
            margin: 0;
            padding: 0;
            list-style: none;
        }
        .aa{
            position: absolute;
            left: 500px;
        }
        .aa,.bb{
            width: 200px;
            height: 400px;
            border: 1px solid #666;
            margin-left: 100px;
            display: inline-block;
        }
        .haveclick{
            background: pink;
        }
    </style>
<div class="row">
	<div class="col-xs-12">
		<div class="table-responsive">
            <span style="font-weight:bold">我的电子券</span>
			<table class="table table-striped table-bordered table-hover">
				<thead>
					<tr>
						<th>电子券名称</th>
						<th>面值</th>
                        <th>类型</th>
						<th>可用范围</th>
						<th>可用条件</th>
						<th>有效期</th>
					</tr>
				</thead>
				<tbody>
						<volist name="data" id="vo">
						<tr>
							<td>{$vo.volume_name}</td>
							<td>{$vo.total}</td>
                            <td><?php
								switch($vo['type']){
									case '1':
									echo '<span class="blue bold">代金券</span>';
                                break;
                                case '2':
                                echo '<span class="red bold">现金券</span>';
                                break;
                                }
                                ?></td>
                            <td>{$vo.category}</td>
                            <td>订单满{$vo.min}可用</td>
                            <td>开始时间：{$vo.start_time} 到期时间：{$vo.end_time}</td>
						</tr>
                            <input type="hidden" id="coupon" value="{$vo.coupon}"/>
						</volist>
						<tr>
							<td colspan="20" class="page">{$page}</td>
						</tr>
				</tbody>
			</table>
		</div>
	</div>
    <a href="{:U('User/Manage')}" class="btn btn-primary" style="margin-right: 10px;float:none;">
        <i class="ace-icon fa">返回</i>
    </a>
</div>
</block>
<block name="javascript">
<script>
$(function(){
	$("#search").click(function () {
        var url = $(this).attr('url');
        var query = $('.search-form').find('input,select').serialize();
        query = query.replace(/(&|^)(\w*?\d*?\-*?_*?)*?=?((?=&)|(?=$))/g, '');
        query = query.replace(/^&/g, '');
        if (url.indexOf('?') > 0) {
            url += '&' + query;
        } else {
            url += '?' + query;
        }
        window.location.href = url;
    });

})
</script>
</block>